'''
This file is a part of nets7r project
Licensed under New BSD license
H3n0xek (C) 2011 
'''

class IdentRegistrationFail(Exception):
    def __init__(self, instance, cls):
        self.instance = instance
        self.cls = cls

    def __str__(self):
        return "Can't register instance %s of type %s" % \
                (repr(self.instance), self.cls)
    
    
class IdentUnregistrationFail(Exception):
    def __init__(self, ID, cls):
        self._id = ID
        self._cls = cls
    
    def __str__(self):
        return "Can't unregister ID %d of type %s" % \
            (self._id, repr(self._cls))


class PortDoesNotExist(Exception):
    pass # TODO: implement me!
    
class MACInvalid(Exception):
    pass # TODO: implement me!

class PortNotMine(Exception):
    pass # TODO: implement me!